function K_NS()
{
	function K_TreePathView(data,container)
	{
		this.data=data;
		this.container=typeof(container=="string")?document.getElementById(container):container;
		this.container.className="K_TreePathView";
		this.init();
		this.setPath(data.getRootItem());
	}
	K_TreePathView.prototype.init=function()
	{
		var titleDiv=this.titleDiv=document.createElement("div");
		titleDiv.className="titleDiv";
		this.container.appendChild(titleDiv);

		var contentDiv=this.contentDiv=document.createElement("div");
		contentDiv.className="contentDiv";
		this.container.appendChild(contentDiv);
	}
	K_TreePathView.prototype.setPath=function(item)
	{
		var titleDiv=this.titleDiv;
		K_Global.deposeNode(titleDiv,true);
		span=document.createElement("span");
		span.className="current";
		span.appendChild(document.createTextNode(item.getProperty("text")));
		titleDiv.appendChild(span);
		for(var parent=item.getParentItem();parent;parent=parent.getParentItem())
		{
			titleDiv.insertBefore(document.createTextNode(" > "),titleDiv.firstChild);
			span=document.createElement("a");
			span.href="javascript:";
			span.className="parent";
			span.innerHTML=parent.getProperty("text");
			titleDiv.insertBefore(span,titleDiv.firstChild);
			K_Global.bind(span,"click",this,this.getClickCallback(parent));
		}

		var contentDiv=this.contentDiv;
		K_Global.deposeNode(contentDiv,true);
		for(var child=item.getFirstChild();child;child=child.getNextSibling())
		{
			span=document.createElement("a");
			span.href="javascript:";
			span.className="child";
			span.appendChild(document.createTextNode(child.getProperty("text")));
			contentDiv.appendChild(span);
			K_Global.bind(span,"click",this,this.getClickCallback(child));
		}
	}
	K_TreePathView.prototype.getClickCallback=function(item)
	{
		return function()
		{
			if(item.getFirstChild())
			{
				this.setPath(item);
			}
		}
	}
	window.K_TreePathView=K_TreePathView;
}
K_NS();